#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
int n,i,j=1,sign=1;
float fac,sum;
cout<<"please input value of n:"<<endl;
cin>>n;
sum=0.0;
fac=1.0;
for(i=1;i<=2*n-1;i=i+2)
{

sum+=sign*fac;/*求前n项的和*/
sign=-sign;
j++;
fac*=j;
j++;
fac*=j;/*计算第n项*/

}
cout<<"sum= "<<sum<<endl;
}